type scanSeriesParamsType = {
  [key: string]: {
    value: any,
    units: string
  }
}


export type scanSeriesType = {
  id: number,
  scanSeriesName: string,
  keywords: any,
  scanType: ChooseScanType,
  params: {
    [key: string]: scanSeriesParamsType
  },
  status: any, // finished、scanning、 wait2Scan_conditionFit、wait2Scan_conditionNotFit
  hasScoutImage?: boolean, // 是否平片出图
  hasImage?: boolean, //是否出图
  ballsInfo?: any, // 扫描位置信息
  normalImage?: any, // 螺旋/断层图像
}
export const scoutParamsDefault = {
  start: {
    value: 0,
    units: ''
  },
  end: {
    value: 0,
    units: ''
  },
  kV: {
    value: 10,
    units: ''
  },
  mA: {
    value: 120,
    units: ''
  },
  scoutType: {
    value: '0',
    units: ''
  }
}


export const normalScanParamsType = {
  kV: {
    showType: 'dropdown',
    disabled: false,
    values: [10, 20, 30, 40],
    order: 1
  },
  mA: {
    showType: 'dropdown',
    disabled: false,
    values: [10, 20, 30, 40],
    order: 2
  },
  start: {
    showType: 'inputNumber',
    order: 3,
    disabled: false,
    limit: {
      max: 120,
      min: 90,
      precision: 1
    }
  },
  end: {
    showType: 'inputNumber',
    order: 4,
    disabled: false,
    limit: {
      max: 120,
      min: 90,
      precision: 1
    }
  },
  fov: {
    showType: 'input',
    order: 5,
    disabled: true,
    limit: {
      max: 120,
      min: 90,
      precision: 1
    }
  },
  windowWidth: {
    showType: 'input',
    order: 6,
    disabled: false,
    limit: {
      max: 120,
      min: 90,
      precision: 1
    }
  },
  windowCenter: {
    showType: 'input',
    order: 7,
    disabled: false,
    limit: {
      max: 120,
      min: 90,
      precision: 1
    }
  },
  angle: {
    showType: 'inputNumber',
    order: 8,
    disabled: true,
    limit: {
      max: 120,
      min: 90,
      precision: 1
    }
  },
  rotateTime: {
    showType: 'dropdown',
    disabled: false,
    values: [1, 2, 3, 4],
    order: 9
  },
  focus: {
    showType: 'dropdown',
    disabled: false,
    values: ['big', 'small'],
    order: 10
  },
  reconstructMatrix: {
    showType: 'dropdown',
    values: [512, 1024],
    disabled: false,
    order: 11
  },
  sliceThickness: {
    showType: 'dropdown',
    values: [0.6, 1.2, 2],
    disabled: false,
    order: 12
  },
  pitch: {
    showType: 'disabled',
    disabled: true,
    order: 13
  },
  collimator: {
    showType: 'disabled',
    disabled: true,
    order: 14
  },
  part: {
    showType: 'disabled',
    disabled: true,
    order: 15
  },
  exposureTimes: {
    showType: 'dropdown',
    values: [1, 2, 3, 4],
    disabled: true,
    order: 19
  }
}


export const monitParamsType = {
  monitorDelay: {
    showType: 'dropdown',
    disabled: true,
    values: [1, 2, 3, 4],
    order: 16
  },
  monitorInterval: {
    showType: 'dropdown',
    disabled: true,
    values: [1, 2, 3, 4],
    order: 17
  },
  enhanceThreshold: {
    showType: 'dropdown',
    values: [1, 2, 3, 4],
    disabled: true,
    order: 18
  }
}


export const scoutParamsType = {
  kV: {
    showType: 'dropdown',
    values: [10, 20, 30, 40],
    order: 1
  },
  mA: {
    showType: 'dropdown',
    values: [10, 20, 30, 40],
    order: 2
  },
  scoutType: {
    showType: 'dropdown',
    values: ['0', '90', '0 + 90', '90 + 180'],
    order: 20
  },
  start: {
    showType: 'input',
    order: 3,
    disabled: true,
    limit: {
      max: 10000,
      min: 0,
      precision: 1
    }
  },
  end: {
    showType: 'input',
    order: 4,
    disabled: true,
    limit: {
      max: 120,
      min: 90,
      precision: 1
    }
  }
}


export enum ChooseScanType {
  none = '',
  scout = 'scout',
  fault = 'fault',
  helical = 'helical',

  normalScan = 'normalScan',
  preMonitor = 'preMonitor',
  monitor = 'monitor',
}
